package org.wzl.springapplication.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.wzl.springapplication.pojo.TaskRecord;
import org.wzl.springapplication.service.TaskRecordService;
import org.wzl.springapplication.mapper.TaskRecordMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author wzl
* @description 针对表【task_record】的数据库操作Service实现
* @createDate 2023-07-29 19:38:51
*/
@Service
public class TaskRecordServiceImpl extends ServiceImpl<TaskRecordMapper, TaskRecord>
    implements TaskRecordService{

    @Override
    public List<TaskRecord> getByName(String name) {
        QueryWrapper<TaskRecord> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("user_name" , name);
        queryWrapper.orderByDesc("create_date");
        return this.baseMapper.selectList(queryWrapper);
    }
}




